/**
 * Company : SIANGKLOM.
 * Created By : Chatree Siangklom
 * Created On : Oct 9, 2013  3:28:35 PM 
 * e-Mail : dr_chatree@hotmail.com
 * Mobile Phone : (+66) 087-921-5115
 * Package Name : com.tis.database.services.promis.impl
 * File Name : VwSyncGlPostingDetailServicesImpl.java
 * TODO
 */
package com.tis.database.services.promis.impl;

import java.util.List;

import org.hibernate.HibernateException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.tis.database.dao.promis.VwSyncGlPostingDetailDao;
import com.tis.database.entitys.DocumentNotSend;
import com.tis.database.entitys.promis.VwSyncGlPostingDetail;
import com.tis.database.services.promis.IVwSyncGlPostingDetailServices;

/**
 * @author Chatree Siangklom of Administrator
 * Date =Oct 9, 2013 : 3:28:35 PM 
 * CreateBy=Chatree Siangklom
 * 
 * VwSyncGlPostingDetailServicesImpl
 * TODO
 */
@Service
@Transactional(readOnly=false)
public class VwSyncGlPostingDetailServicesImpl implements IVwSyncGlPostingDetailServices {

	@Autowired VwSyncGlPostingDetailDao vwSyncGlPostingDetailDao;
	
	/**
	 * Date =Oct 9, 2013 : 3:28:35 PM 
	 * CreateBy=Chatree Siangklom
	 * VwSyncGlPostingDetailServicesImpl
	 * TODO
	 */
	public VwSyncGlPostingDetailServicesImpl() {
		// TODO Auto-generated constructor stub
	}

	/** (Javadoc)
	 * @see com.tis.database.services.promis.IVwSyncGlPostingDetailServices#Search(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int)
	 * Date =Oct 9, 2013 : 3:28:35 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	@Override
	public List<VwSyncGlPostingDetail> Search(	String company, 
												String project,
												String documentNo, 
												String refDocNo, 
												String narration,
												String accountCode, 
												String postingKey, 
												String status,
												String syncIsstaging,
												String syncIssync, 
												String postingDateStart,
												String postingDateEnd, 
												int maxResult) throws HibernateException, Exception {
		
		return vwSyncGlPostingDetailDao.Search(company, project, documentNo, refDocNo, narration, accountCode, postingKey, status, syncIsstaging, syncIssync, postingDateStart, postingDateEnd, maxResult);
	}

	/** (Javadoc)
	 * @see com.tis.database.services.promis.IVwSyncGlPostingDetailServices#SearchByDocumentNo(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
	 * Date =Oct 9, 2013 : 3:28:35 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	@Override
	public List<VwSyncGlPostingDetail> SearchByDocumentNo(	String company, 
															String project, 
															String documentNo, 
															String status, 
															String refDocNo) throws HibernateException, Exception {
		
		return vwSyncGlPostingDetailDao.SearchByDocumentNo(company, project, documentNo, status, refDocNo);
	}

	/** (Javadoc)
	 * @see com.tis.database.services.promis.IVwSyncGlPostingDetailServices#SearchByVoucherType(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
	 * Date =Oct 11, 2013 : 4:25:40 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	@Override
	public List<VwSyncGlPostingDetail> SearchByVoucherType(	String company,
															String project, 
															String documentNo, 
															String voucherType,
															String syncIsstaging, 
															String syncIssync, 
															String status,
															String refDocNo,
															int maxResult) throws HibernateException, Exception {
		
		return vwSyncGlPostingDetailDao.SearchByVoucherType(company, project, documentNo, voucherType, syncIsstaging, syncIssync, status, refDocNo, maxResult);
	}

	/** (Javadoc)
	 * @see com.tis.database.services.promis.IVwSyncGlPostingDetailServices#SearchByIsNotSend(int)
	 * Date =Oct 29, 2013 : 5:08:09 PM 
	 * CreateBy=Chatree Siangklom
	 * TODO
	 */
	@Override
	public List<DocumentNotSend> SearchByIsNotSend(int maxResult) throws Exception {

		return vwSyncGlPostingDetailDao.SearchByIsNotSend(maxResult);
	}

}
